package demo.messaging.common;

import java.util.List;
import java.util.Map;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * The async counterpart of <code>IMessageService</code>.
 */
public interface IMessageServiceAsync {

	void getMessages(AsyncCallback<List<? extends AbstractMessage>> callback);

	void listUsers(AsyncCallback<Map<String, EnumUserStatus>> callback);

	void login(String name, AsyncCallback<Void> callback);

	void logout(String userName, AsyncCallback<Void> asyncCallback);

	void sendMessage(AbstractMessage message, AsyncCallback<Void> callback);

	void updateUserStatus(EnumUserStatus status, AsyncCallback<Void> callback);

}
